package com.iplant.wms.service.po.brm;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.iplant.base.po.BasePO;
import com.iplant.base.po.enums.DBSchemas;
import com.iplant.base.utils.annotation.po.DBBasePO;
import com.iplant.base.utils.annotation.condition.DBCondition;
import com.iplant.base.utils.annotation.field.DBField;
import com.iplant.base.utils.annotation.join.DBJoin;

import java.io.Serializable;


/**
 * 包装详情
 *
 * @author ShrisJava
 */

@DBBasePO(TableName = "brm_distributionprop",
        CheckName = {"RuleID,Name","RuleID,TypeID", "RuleID,Code"},

        Schemas = DBSchemas.WMS,CodeAuto = true,CodePrefix = "BDP-")
public class BRMDistributionProp extends BasePO implements Serializable {
    private static final long serialVersionUID = 1L;

    @DBCondition
    @DBField
    public int TypeID=0;

    @DBCondition
    @DBField
    public int RuleID = 0;



    /**
     * 包装模板代码
     */
    @DBCondition(CompareType = DBCondition.DBCompareType.like,ParamName2="RuleCodeEQ")
    @DBJoin(name = "Code",tableName="mss_distributionrule",Schemas = DBSchemas.WMS,tableAsName = "r1",MainTableField = "RuleID")
    public String RuleCode = "";

    /**
     * 主单位 内包装 箱 栈板
     */
    @DBCondition(CompareType = DBCondition.DBCompareType.like)
    @DBJoin(name = "Name",tableName="mss_distributionrule",Schemas = DBSchemas.WMS,tableAsName = "r1",MainTableField = "RuleID")
    public String RuleName = "";


    /**
     * 规则引擎  1 只能从某拣货库位
     */
    @DBField
    public int LimitType = 0;

    /**
     * 是否超量预配
     */
    @DBField
    public int OverEnable = 0;


    @JsonProperty("RuleID")
    public int getRuleID() {
        return RuleID;
    }

    public void setRuleID(int ruleID) {
        RuleID = ruleID;
    }

    @JsonProperty("RuleCode")
    public String getRuleCode() {
        return RuleCode;
    }

    public void setRuleCode(String ruleCode) {
        RuleCode = ruleCode;
    }

    @JsonProperty("RuleName")
    public String getRuleName() {
        return RuleName;
    }

    public void setRuleName(String ruleName) {
        RuleName = ruleName;
    }

    @JsonProperty("LimitType")
    public int getLimitType() {
        return LimitType;
    }

    public void setLimitType(int limitType) {
        LimitType = limitType;
    }

    @JsonProperty("OverEnable")
    public int getOverEnable() {
        return OverEnable;
    }

    public void setOverEnable(int overEnable) {
        OverEnable = overEnable;
    }
}
